// Copyright@ChenChao

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "CPlayerController.generated.h"

class ACPlayerCharacter;
class UGameplayWidget;
/**
 * 
 */
UCLASS()
class CRUNCH_API ACPlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	// 只有客户端（或者监听服务器）调用的方法
	virtual void AcknowledgePossession(class APawn* P) override;
private:
	UPROPERTY()
	TObjectPtr<ACPlayerCharacter> CPlayerCharacter;

	/*************************************************************************************************/
	/*                                             UI                                                */
	/*************************************************************************************************/
private:
	void SpawnGameplayWidget();
	
	UPROPERTY()
	TObjectPtr<UGameplayWidget> GameplayWidget;

	UPROPERTY(EditDefaultsOnly, Category="UI")
	TSubclassOf<UGameplayWidget> GameplayWidgetClass;
};
